
#Region "Summary"
''' -----------------------------------------------------------------------------
''' Project	 : PTT.StationsTracking.Data
''' Class	 : StationsTracking.Data.QueryInvDataDriver
''' 
''' -----------------------------------------------------------------------------
''' <summary>
''' Query Result Single Business Entity
''' </summary>
''' <remarks>
''' Sample of business entity coding
''' </remarks>
''' <history>
''' 	[Generater by Nok]	22/3/2549 13:03:26	Created
''' </history>
''' -----------------------------------------------------------------------------
#End Region

#Region ".NET Framework Class Import"
Imports System
Imports System.Xml.Serialization
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
Imports System.Collections
#End Region

<Serializable()> _
Public Class QueryInvDataDriver
#Region "Internal member variables"
    Private _DriverCode As String
    Private _DriverName As String
    Private _DriverId As String
    Private _Telephone As String
    Private _TypeDrivingLicense As String
    Private _Remark As String
    Private _DriverStatus As Byte
    Private _GroupId As Int16
    Private _OwnerId As Int16
    Private _InvDriverGroups As QueryInvDriverGroups
    Private _InvOwners As QueryInvOwners
#End Region

    Public Sub New()
        _DriverCode = Nothing
        _DriverName = Nothing
        _DriverId = Nothing
        _Telephone = Nothing
        _TypeDrivingLicense = Nothing
        _Remark = Nothing
        _DriverStatus = Nothing
        _GroupId = Nothing
        _OwnerId = Nothing
        _InvDriverGroups = Nothing
        _InvOwners = Nothing
    End Sub

    Public Sub New(ByVal DriverCode As String, _
       ByVal DriverName As String, _
       ByVal DriverId As String, _
       ByVal Telephone As String, _
       ByVal TypeDrivingLicense As String, _
       ByVal Remark As String, _
       ByVal DriverStatus As Byte, _
       ByVal GroupId As Int16, _
       ByVal OwnerId As Int16, _
      Optional ByVal InvDriverGroups As QueryInvDriverGroups = Nothing, _
      Optional ByVal InvOwners As QueryInvOwners = Nothing)
        _DriverCode = DriverCode
        _DriverName = DriverName
        _DriverId = DriverId
        _Telephone = Telephone
        _TypeDrivingLicense = TypeDrivingLicense
        _Remark = Remark
        _DriverStatus = DriverStatus
        _GroupId = GroupId
        _OwnerId = OwnerId
        _InvDriverGroups = InvDriverGroups
        _InvOwners = InvOwners
    End Sub

#Region "Property"

    Public Property DriverCode() As String
        Get
            Return _DriverCode
        End Get
        Set(ByVal value As String)
            _DriverCode = value
        End Set
    End Property


    Public Property DriverName() As String
        Get
            Return _DriverName
        End Get
        Set(ByVal value As String)
            _DriverName = value
        End Set
    End Property


    Public Property DriverId() As String
        Get
            Return _DriverId
        End Get
        Set(ByVal value As String)
            _DriverId = value
        End Set
    End Property


    Public Property Telephone() As String
        Get
            Return _Telephone
        End Get
        Set(ByVal value As String)
            _Telephone = value
        End Set
    End Property


    Public Property TypeDrivingLicense() As String
        Get
            Return _TypeDrivingLicense
        End Get
        Set(ByVal value As String)
            _TypeDrivingLicense = value
        End Set
    End Property


    Public Property Remark() As String
        Get
            Return _Remark
        End Get
        Set(ByVal value As String)
            _Remark = value
        End Set
    End Property


    Public Property DriverStatus() As Byte
        Get
            Return _DriverStatus
        End Get
        Set(ByVal value As Byte)
            _DriverStatus = value
        End Set
    End Property


    Public Property GroupId() As Int16
        Get
            Return _GroupId
        End Get
        Set(ByVal value As Int16)
            _GroupId = value
        End Set
    End Property


    Public Property OwnerId() As Int16
        Get
            Return _OwnerId
        End Get
        Set(ByVal value As Int16)
            _OwnerId = value
        End Set
    End Property


    Public Property InvDriverGroups() As QueryInvDriverGroups
        Get
            Return _InvDriverGroups
        End Get
        Set(ByVal value As QueryInvDriverGroups)
            _InvDriverGroups = value
        End Set
    End Property


    Public Property InvOwners() As QueryInvOwners
        Get
            Return _InvOwners
        End Get
        Set(ByVal value As QueryInvOwners)
            _InvOwners = value
        End Set
    End Property

#End Region
End Class

''' -----------------------------------------------------------------------------
''' Project	 : PTT.StationsTracking.Data
''' Class	 : StationsTracking.Data.QueryInvDataDrivers
''' 
''' -----------------------------------------------------------------------------
''' <summary>
''' Collection of query result
''' </summary>
''' <remarks>
''' Sample
''' </remarks>
''' <history>
''' 	[NOK'S Generater]	22/3/2549 13:03:27	Created
''' </history>
''' -----------------------------------------------------------------------------
<Serializable()> _
Public Class QueryInvDataDrivers
    Inherits CollectionBase


    Default Public ReadOnly Property Item(ByVal index As Integer) As QueryInvDataDriver
        Get
            If (index < 0 Or index >= Me.InnerList.Count) Then
                Throw New Exception("index has to be between 0 and " & (Me.InnerList.Count - 1).ToString())
            Else
                Return CType(Me.InnerList(index), QueryInvDataDriver)
            End If
        End Get
    End Property

    Public Sub Add(ByVal info As QueryInvDataDriver)
        Me.InnerList.Add(info)
    End Sub

    Public Sub SetItem(ByVal index As Integer, ByVal value As QueryInvDataDriver)
        If (index < 0 Or index >= Me.InnerList.Count) Then
            Throw New Exception("index has to be between 0 and " & (Me.InnerList.Count - 1).ToString())
        Else
            Me.InnerList(index) = value
        End If
    End Sub


End Class
